package site.codeyin.javautils.utils.mapstruct.common;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import site.codeyin.javautils.utils.mapstruct.pojo.MapStructData;
import site.codeyin.javautils.utils.mapstruct.pojo.MapStructVO;


/**
 * @author <a href="https://github.com/liangcheng2221">yinjie</a>
 * @date 2024-09-08 10:06
 */
@Mapper
public interface MapStructConvertor {


    MapStructConvertor INSTANCES = Mappers.getMapper(MapStructConvertor.class);

    @Mappings({
            @Mapping(source = "date", target = "dateTime"),
            @Mapping(target = "longDate", ignore = true),
    })
    MapStructVO toMapStructVO(MapStructData mapStructData);
}
